﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.master" AutoEventWireup="true" CodeBehind="Confirm_Sender.aspx.cs" Inherits="UdrinkWater_Project.Officer.Confirm_Sender" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    
    <dx:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server" Width="100%" 
        HeaderText="รายการสินค้าที่จัดส่งแล้ว">
        <HeaderStyle Font-Size="Medium" HorizontalAlign="Left" />
        <PanelCollection>
            <dx:PanelContent runat="server" SupportsDisabledAttribute="True">
                <dx:ASPxGridView ID="GV_SenderCon" runat="server" AutoGenerateColumns="False" 
                    ShowInCustomizationForm="True" ShowSelectCheckbox="True" 
                    DataSourceID="SqlDataSource1" KeyFieldName="Order_Date" Width="100%" 
                    OnRowCommand="GV_SenderCon_RowCommand">
                    <Columns>
                        <dx:GridViewCommandColumn Caption="ค้นหา" ShowInCustomizationForm="True" 
                            VisibleIndex="0">
                            <ClearFilterButton Visible="True">
                            </ClearFilterButton>
                        </dx:GridViewCommandColumn>
                        <dx:GridViewDataDateColumn Caption="เลขที่ใบรายการ" FieldName="Order_Date" 
                            ReadOnly="True" ShowInCustomizationForm="True" VisibleIndex="1" 
                            Width="180px">
                            <PropertiesDateEdit DisplayFormatString="yyyy-MM-dd HH:mm:ss.fff" 
                                EditFormat="Custom">
                            </PropertiesDateEdit>
                            <Settings AllowAutoFilter="False" />
                        </dx:GridViewDataDateColumn>
                        <dx:GridViewDataTextColumn FieldName="Customer_ID" 
                            ShowInCustomizationForm="True" VisibleIndex="2" Caption="ชื่อลูกค้า">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataDateColumn FieldName="Shipped_date" 
                            ShowInCustomizationForm="True" VisibleIndex="3" Caption="วันกำหนดส่ง" 
                            Width="50px">
                        </dx:GridViewDataDateColumn>
                        <dx:GridViewDataTextColumn FieldName="Delivery_Address" 
                            ShowInCustomizationForm="True" VisibleIndex="4" Caption="ที่อยู่">
                            <Settings AllowAutoFilter="False" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataComboBoxColumn Caption="สถานะการส่ง" FieldName="Status" 
                            ShowInCustomizationForm="True" VisibleIndex="5">
                            <PropertiesComboBox DataSourceID="Statussender" TextField="Status_Name" 
                                ValueField="Status_ID" ValueType="System.Int32">
                            </PropertiesComboBox>
                            <Settings AllowAutoFilter="False" />
                        </dx:GridViewDataComboBoxColumn>
                        <dx:GridViewDataTextColumn FieldName="Employee_ID" 
                            ShowInCustomizationForm="True" VisibleIndex="6" Caption="พนักงานทำรายการ" 
                            Width="60px">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataComboBoxColumn Caption="สถานะการจ่ายเงิน" 
                            FieldName="Status_Unpaid" ShowInCustomizationForm="True" VisibleIndex="7" 
                            Width="50px">
                            <PropertiesComboBox DataSourceID="SqlData_Unpaid" TextField="Unpaid_Name" 
                                ValueField="Unpaid_ID" ValueType="System.Int32">
                            </PropertiesComboBox>
                        </dx:GridViewDataComboBoxColumn>
                        <dx:GridViewDataTextColumn ShowInCustomizationForm="True" VisibleIndex="8" 
                            Width="60px">
                            <DataItemTemplate>
                                <asp:LinkButton ID="Link_DetialUnpaid" CommandName="Cmd_Detial" CommandArgument='<%# Eval("Order_Date") %>' runat="server" Font-Underline="True" 
                                    ForeColor="#80A70E">รายละเอียด</asp:LinkButton>
                            </DataItemTemplate>
                            <CellStyle HorizontalAlign="Center">
                            </CellStyle>
                        </dx:GridViewDataTextColumn>
                    </Columns>
                    <SettingsBehavior AllowSelectByRowClick="True" />
                    <SettingsPager Mode="ShowAllRecords">
                    </SettingsPager>
                    <Settings ShowFilterRow="True" />
                </dx:ASPxGridView>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:DB_Udrink %>" 
                    
                    
                    
                    
                    SelectCommand="SELECT [Order_Date], [Customer_ID], [Shipped_date], [Delivery_Address], [Status], [Employee_ID], [Status_Unpaid] FROM [TB_Order] WHERE ([Status] =2)">
                </asp:SqlDataSource>
                <asp:SqlDataSource ID="Statussender" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:DB_Udrink %>" 
                    SelectCommand="SELECT * FROM [TB_SenderStatus]"></asp:SqlDataSource>
                <asp:SqlDataSource ID="SqlData_Unpaid" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:DB_Udrink %>" 
                    SelectCommand="SELECT * FROM [TB_StatusUnpaid]"></asp:SqlDataSource>
            </dx:PanelContent>
        </PanelCollection>
    </dx:ASPxRoundPanel>
    
</asp:Content>
